package proxy.smart;

/**
 * 智能引用代理:Smart Proxy
 * 
 * 在搜索的时需要进行进行权限认证和使用计数
 * 
 * @version 2009-6-29
 * @author Winty(wintys@gmail.com)
 */
public class SmartProxyTest {
	public static void main(String[] args) {
		String result;
		Searcher searcher;

		// 未授权访问
		searcher = new ProxySearcher("anonymous");
		result = searcher.search("abc");
		System.out.println("result:" + result);

		// 授权访问
		searcher = new ProxySearcher("admin");
		result = searcher.search("xyz");
		System.out.println("result:" + result);
	}
}